Skip to main content

UnitTests

Unit Test Plan - Horizontal Bar Chart

Test stepsValidationTool used
Test 1:Get Default Text Data
- Without chartDataModeShould return proper axis data without chartDataMode definedRTL
- With default chartDataModeShould return proper axis data with default chartDataModeRTL
- With fraction chartDataModeShould return proper axis data with fraction chartDataModeRTL
- With percentage chartDataModeShould return proper axis data with percentage chartDataModeRTL
Test 2: Get chart Data Text
- With default chart dataShould return proper text data with default chart dataRTL
- With custom chart dataShould return proper text data with custom chart dataRTL
Test 3: Create Benchmark
- Without benchmark dataShould return proper benchmark data without any benchmark data in inputRTL
- With benchmark dataShould return proper benchmark data with proper benchmark data in inputRTL
Test 4: Create Bars
- With proper chart dataShould return bar count properlyRTL
- With horizontalbarchart dataShould return bar width properlyRTL
- With barHeight as “x”Should return bar heigh properlyRTL
Test 5: Get Aria-Label
- With empty chart dataShould return bar aria-label as 0 when there is no chart dataRTL
- With proper chart dataShould return bar aria-label properly when proper chart data is thereRTL
- Without yAxisCalloutDataShould return bar aria-label properly when there is no yAxisCalloutDataRTL
- Without xAxisCalloutDataShould return bar aria-label properly when there is no xAxisCalloutDataRTL
- Without xAxisCalloutData and yAxisCalloutDataShould return bar aria- label properly when there is no xAxisCalloutData and yAxisCalloutDataRTL
- Without xAxisCalloutData, yAxisCalloutData and horizontalBarChartdataShould return bar aria-label properly when there is no xAxisCalloutData, yAxisCalloutData and horizontalBarChartdataRTL
- With callOutAccessibilityDataShould return bar aria-label properly when we have callOutAccessibilityDataRTL
- With callOutAccessibilityData and chart dataShould return bar aria-label properly when we have callOutAccessibilityData and other propertiesRTL